{extend name="common/main"/}

{block name="body"}
<div class="member-list-section">
    <!-- 标题栏 -->
    <div class="main-title">
        <h2>用户反馈列表</h2>
    </div>
    <div class="button-box row clearfix">
        <div class="col-md-6">
            <button class="btn btn-success ajax-post confirm" url="{:url('status', ['status'=> 1])}" target-form="ids">
                已处理
            </button>
            <button class="btn btn-warning ajax-post confirm" url="{:url('status', ['status'=> 0])}" target-form="ids">
                未处理
            </button>
            <button class="btn btn-danger ajax-post confirm" url="{:url('status', ['status'=> -1])}" arget-form="ids">
                删除
            </button>
        </div>
    </div>
    <!-- 数据列表 -->
    <div class="data-table with-padding">
        {notempty name="lists.data"}
        <table class="table table-bordered table-striped user-table muu-table">
            <thead>
            <tr>
                <th class="row-selected row-selected">
                    <input type="checkbox" class="check-all" id="check-all">
                    <label for="check-all"></label>
                </th>
                <th>用户</th>
                <th>内容</th>
                <th>图片</th>
                <th>状态</th>
                <th width="200">操作</th>
            </tr>
            </thead>
            <tbody>
            
            {volist name="lists.data" id="vo"}
                <tr>
                    <td>
                        <input class="ids" id="feedback-{$vo.id}" type="checkbox" name="ids[]" value="{$vo.id}"/>
                        <label for="feedback-{$vo.id}"></label>
                    </td>
                    <td>
                        {if !empty($vo.uid) && !empty($vo.user_info) && $vo.user_info != -1}
                        <a class="user-info" href="{:url('admin/Member/detail',['uid'=>$vo['uid']])}">
                            <div class="avatar">
                                <img src="{$vo['user_info']['avatar64']}">
                            </div>
                            <div class="info">
                                <div class="nickname text-ellipsis">[{$vo.user_info.uid|default=0}]{$vo.user_info.nickname|default=""}</div>
                            </div>
                        </a>
                        {else}
                        用户不存在
                        {/if}
                    </td>
                    <td>{$vo.content}</td>
                    <td></td>
                    <td>
                        {if $vo.status == 1}
                        <span class="label label-success">{$vo.status_str}</span>
                        {/if}
                        {if $vo.status == 0}
                        <span class="label label-warning">{$vo.status_str}</span>
                        {/if}
                    </td>
                    <td>
                        <a type="button" class="btn btn-sm btn-primary" data-iframe="{:url('admin/Message/send',['to_uid' => $vo['uid']])}" data-toggle="modal" data-size="lg" data-height="600px">发送消息</a>
                        <a class="btn btn-sm btn-info ajax-post" href="{:url('status',['status'=>1, 'ids'=>$vo['id']])}" data-confirm="确认已处理操作？">已处理</a>
                        <a class="btn btn-sm btn-danger ajax-post" href="{:url('status',['status'=>-1, 'ids'=>$vo['id']])}" data-confirm="确认执行删除操作？">删除</a>
                    </td>
                </tr>
            {/volist}
            
            </tbody>
        </table>
        {else/}
        {include file="common/_empty"/}
        {/notempty}
        <!-- 分页 -->
        <div class="page">
            {:htmlspecialchars_decode($pager)}
        </div>
        <!-- /分页-->
    </div>
</div>
{/block}
{block name="script"}
<script>

</script>   
{/block}